import VueRouter from 'vue-router'

// 导入对应的路由组件
import indexcontainer from './components/tabbar/indexcontainer.vue'
import membercontainer from './components/tabbar/membercontainer.vue'
import searchcontainer from './components/tabbar/searchcontainer.vue'
import shopcartcontainer from './components/tabbar/shopcartcontainer.vue'
import newlist from './components/news/newlist.vue'
import newsinfo from './components/news/newsinfo.vue'
import photolist from './components/photos/photolist.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goodslist from './components/shop/goodslist.vue'
import goodsinfo from './components/shop/goodsinfo.vue'
import goodspicture from './components/shop/goodspicture.vue'
import goodsword from './components/shop/goodsword.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/index'},
    {path:'/index',component:indexcontainer},
    {path:'/search',component:searchcontainer},
    {path:'/shopcart',component:shopcartcontainer},
    {path:'/member',component:membercontainer},
    {path:'/index/newlist',component:newlist},
    {path:'/index/newsinfo/:id',component:newsinfo},
    {path:'/index/photolist',component:photolist},
    {path:'/index/photoinfo/:id',component:photoinfo},
    {path:'/index/goodslist',component:goodslist},
    {path:'/index/goodsinfo/:id',component:goodsinfo},
    {path:'/index/goodspicture/:id',component:goodspicture},
    {path:'/index/goodsword/:id',component:goodsword},
  ],
  linkActiveClass:"mui-active"//覆盖默认高亮的类
})

// 把路由对象暴露出去
export default router